@extends("/main_template",menu="opencard")
@import cn.hn.java.summer.mvc.ViewTools
<div class="panel panel-primary">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-bookmark pull-left"></i>
        <h3 class="panel-title">促销卡开卡<span class="pull-right"></h3>
    </div>
    <div class="panel-body row">
        <form class="form-horizontal col-xs-7">
            <div class="form-group">
                <label for="txtCardId" class="col-xs-2 control-label">卡号</label>
                <div class="col-xs-10">
                    <div class="input-group">
                        <input type="text" name="cardId" class="form-control" id="txtCardId" placeholder="卡号" readonly="readonly">
                        <span class="input-group-btn">
                            <button id="jsReadCard" class="btn btn-success" type="button">读卡</button>
                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="txtYaJin" class="col-xs-2 control-label">押金</label>
                <div class="col-xs-10">
                    <input type="text" name="depositAmount" class="form-control" id="txtYaJin" placeholder="押金"  readonly="readonly">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-xs-2 control-label">金额</label>
                <div class="col-xs-10 btn-group-vertical" data-toggle="buttons">
	                    <label class="win_level_btn col-xs-12 btn btn-primary btn-lg">
	                        <i class="glyphicon glyphicon-ok pull-left"></i>
	                        <input name="addMoney" value="3" type="radio" autocomplete="off">等奖
	                    </label>
                </div>
			</div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-xs-3">
                    <button id="jsBtnOpenCard" type="button" class="btn btn-lg btn-success">确认开卡</button>
                </div>
                <div class="col-sm-offset-1 col-xs-3">
                    <a href="@url("/index.html")" class="btn btn-lg btn-warning">取消</a>
                </div>
            </div>
        </form>
        <div class="col-xs-4">
            <h2>操作说明</h2>
            <ol>
                <li>验证顾客的中奖券是否真实有效；</li>
                <li>把对应的促销卡放在读卡器取号，并检查左边的卡号；</li>
                <li>选择对应奖等的金额，收取顾客开卡押金后，进行开卡；</li>
                <li>告知顾客开卡柜台统一初始密码，为保障卡安全自行在自助终端改密码；</li>
                <li>最后“确认”和“打印”单据，单据给顾客；</li>
            </ol>
            <h4 class="alert alert-danger">注意：促销卡过了促销时间不能再开卡和购票，遗失不补、不能换卡、不能充值，赠送的金额仅限销售。</h4>
        </div>
    </div>
</div>
<div id="comfirOpen" class="hidden">
    <div class="row">
        <h2 class="col-xs-12 text-danger text-center">确定要为卡号<span id="ccid"></span>
        	<br/>开通<span id="cadd"></span>的促销金额吗</h2>
    </div>
</div>
<div id="showOpenMsg" class="hidden">
    <div class="row">
        <h2 class="col-xs-12 text-danger text-center">开卡成功！</h2>
    </div>
</div>
<script id="templatePrint" type="text/html">
    "用户促销卡开卡收据清单" +
    "\n" +
    "    卡号：{{cardId}}" +
    "\n" +
    "    押金：{{depositAmount}}元" +
    "\n" +
    "    充值：{{addMoney}}元" +
    "\n" +
    "账户余额：{{balanceAmount}}元" +
    "\n" +
    "    大厅：{{hallId}}" +
    "\n" +
    "操作时间：{{modifyTime}}" +
    "\n" +
    "  操作员：{{cashierId}}" +
    "\n" +
    "请务必保管好卡和密码，如出现卡遗失或密码遗忘，彩民自行负担责任与损失，大厅概不负责。" +
    "	^"
</script>
@section(script){
<script type="text/javascript" src="@url("/static/js/app.opencard.js")"></script>
}